package com.example.sptest;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceScreen;
import android.util.Log;

public class Setting extends PreferenceActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
//		setContentView(R.layout.activity_setting);
		addPreferencesFromResource(R.xml.preferences);
	}
	
	@Override
	public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen,
			Preference preference) {
		SharedPreferences sp = preference.getSharedPreferences();
		boolean ON_OFF = sp.getBoolean("checkbox_preference", false);
		Log.i("lenve", ON_OFF+"");
		String text = sp.getString("edittext_preference", "");
		Log.i("lenve", text+"");
		String listtext = sp.getString("list_preference", "");
		Log.i("lenve", listtext+"");
		boolean next_screen = sp.getBoolean("next_screen_checkbox_preference", false);
		Log.i("lenve", next_screen+"");
		return true;
	}
}
